<style type="text/css">

body{background:#eee}
.parent-category{float:left; width:100%; height:auto; min-height:100%;}
.parent-category ul{margin:0; padding:0; width:100%;}
.parent-category ul li{list-style:none; text-align:center; height:50px; line-height:50px; white-space:nowrap; width:100%; border-bottom:1px solid #e0e0e0; position:relative; right:-1px;}
.parent-category ul li.active{border-right:1px solid #fff; z-index: 10000}
.parent-category ul li a{display:inline-block; width:100%; height:100%; text-decoration:none;}
.children-category{width:100%; min-height:100%; height:auto; color: #252525;}
.children-category ul{list-style:none; margin:0; padding:0; overflow-y:auto; overflow-x:hidden; border-left:1px solid #e0e0e0; min-height:100%;}
.children-category ul li{text-align:left; height: 32px; line-height: 32px; padding-left: 10px}
.children-category ul li.delivery-tips{height:25px; line-height:25px; margin-top: -15px; font-size: .65rem; color: #ff2d4b}
.children-category ul li a{display:inline-block; width:100%; height:100%; text-decoration:none;}
.children-category ul li a span{font-size: .6rem; color: #999;}
.children-category .block{display:block; color:#ef1e15; font-size:.6rem;}
.fe-floatright-bottom a {
    display: block;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 100%;
    background-color: #ff9999;
    color: #fff;
    line-height: 0.7rem;
	font-size:0.45rem;
    margin: 0.5rem auto;
    margin-right: 0;
}
.fe-floatright-bottom a .icon {
    color: #fff;
    font-size: 0.6rem;
    height: 0.6rem;
	line-height: 1rem;
    opacity: 1;
}
</style>

<div class="parentDiv" style="margin-bottom:3rem">
<div class="div1">
<div class="fe-mod-9" style="height:14rem;min-height:6rem">
     <div id="l-map" style="height: 14rem;padding:0px 0px;"></div>
	<div class="group-top" style="background:rgba(0,0,0,0.3);position: absolute;top:5rem;height:10rem;width:100%">
     <div class="fui-list jump text-center">
          <a class="fui-list-inner" href="">
             <div class="title" style="color: #fff;margin:0.8rem 0 0 0">{{pagedata.store.title}}</div>
             <div class="subtitle" style="color: #fff;font-size:0.5rem">{{pagedata.store.desc}}</div>
           </a>
      </div>
	</div>
    <div class="fe-mod-9-shoplogo" style="top:2rem"> 
        <div class="fe-mod-9-shoplogo-img" style="">
            <img src="{{tomedia(pagedata.store.logo) || '../core/resource/images/nopic.jpg'}}">
        </div>
    </div>
</div>
<div ng-if="pagedata.pluginset.hdps.length>0" id="carousel-container" class="carousel slide"  style="position:absolute;top:8.5rem;width:80%;left:10%;border-radius:0.5rem" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:5rem">
				<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.pluginset.hdps" style="height:5rem">
					<a href="javascript:;" ng-click="access_json(item.url)">
						<img src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;border-radius:0.5rem">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.pluginset.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
</div>
<div ng-if="pagedata.notices.length>0" class="fui-notice">
			<div class="image"><img src="../core/resource/images/diy/hotdot.jpg"></div>
			<div class="icon"><i class="fa fa-volume-up" style="font-size: 0.7rem;"></i></div>
			<div class="text">
				<ul>
						<li ng-repeat="item in pagedata.notices">
							<a href="javascript:;" ng-click="access_json('core/article.list/detail/id='+item.id)">{{item.title}}</a>
						</li>
				</ul>
			</div>
</div>
<div class="weui_cells weui_cells_access" style="margin-top:0">
            
            <a class="weui_cell" ng-click="pagedata.openLocation(pagedata.store);">
                <div class="weui_cell_hd"><i class="icon jinyunicon icon-map" style="font-size:0.8rem"></i> 商户地址</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <span>{{pagedata.store.address}}</span>
                </div>
				<div class="weui_cell_ft">
                </div>
            </a>
			
			<a class="weui_cell" href="tel:{{pagedata.store.phone}}">
                <div class="weui_cell_hd"><i class="icon jinyunicon icon-phone" style="font-size:0.8rem"></i> 电话</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <span>{{pagedata.store.phone}}</span>
                </div>
				<div   class="weui_cell_ft">
                </div>
            </a>
			
			<a class="weui_cell">
                <div class="weui_cell_hd"><i class="icon jinyunicon icon-fuwuchuanga" style="font-size:0.8rem"></i> 营业时间</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <span>{{pagedata.store.time.start}}~{{pagedata.store.time.end}}</span>
                </div>
            </a>
			<a class="weui_cell">
                <div class="weui_cell_hd"><i class="icon jinyunicon icon-gonggao" style="font-size:0.8rem"></i> 商户简介</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <span>{{pagedata.store.desc}}</span>
                </div>
            </a>
			<a class="weui_cell">
                <div class="weui_cell_hd"><i class="icon jinyunicon icon-qrcode" style="font-size:0.8rem"></i> 店铺二维码</div>
                <div ng-click="show()"  class="weui_cell_bd weui_cell_primary">
                    <span ng-click="show()" >点击查看</span>
                </div>
            </a>
			<a class="weui_cell" ng-show="pagedata.showapp==1">
                <div class="weui_cell_hd"><i class="icon jinyunicon icon-xiaochengxuma" style="font-size:0.8rem"></i> 小程序二维码</div>
				<div ng-click="pagedata.show=2"  class="weui_cell_bd weui_cell_primary">
                    <span ng-click="show()" >点击查看</span>
                </div>
            </a>
			
</div>
</div>
</div>
<div ng-show="pagedata.show==1" class="fui-page fui-page-current page-commission-shares">
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">推广二维码</div>
        <div class="fui-header-right"></div>
    </div>
    <div class="fui-content">
     <!--   {if !empty($goods)}
        <div class="fui-list-group">
            <div class="fui-list">
                <div class="fui-list-media">
                    <i class="icon icon-money"></i>
                </div>
                <div class="fui-list-inner">
                    <div class="row">
                        <div class="row-text">预计最高{php echo $this->set['texts']['commission1']} <span class='text-danger'>{$commission}</span> {php echo $this->set['texts']['yuan']}
                        </div>
                    </div>
                    <div class="subtitle">已销售 <span>{$goods['sales']}</span> 件</div>
                </div>
            </div>
        </div>
        {/if} -->
        <!-- 系统生成图片 开始 -->
        <div class="fui-list">
                <div class="fui-card" style="margin-left:auto;margin-right:auto">
                    <div class="fui-card-content" style="text-align:center">
                        长按分享二维码
					</div>
					<img src="{{pagedata.qrcode}}"  />
                </div>
				
         </div>
	  <div ng-click="pagedata.show=0" style="text-align:center">关闭 </div>
    </div>
</div>
<div ng-show="pagedata.show==2" class="fui-page fui-page-current page-commission-shares">
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">小程序二维码</div>
        <div class="fui-header-right"></div>
    </div>
    
    <div class="fui-content">
     <!--   {if !empty($goods)}
        <div class="fui-list-group">
            <div class="fui-list">
                <div class="fui-list-media">
                    <i class="icon icon-money"></i>
                </div>
                <div class="fui-list-inner">
                    <div class="row">
                        <div class="row-text">预计最高{php echo $this->set['texts']['commission1']} <span class='text-danger'>{$commission}</span> {php echo $this->set['texts']['yuan']}
                        </div>
                    </div>
                    <div class="subtitle">已销售 <span>{$goods['sales']}</span> 件</div>
                </div>
            </div>
        </div>
        {/if} -->
        <!-- 系统生成图片 开始 -->
        <div class="fui-list">
                <div class="fui-card" style="margin-left:auto;margin-right:auto">
                    <div class="fui-card-content" style="text-align:center">
                        长按分享二维码
					</div>
					<img src="{{tomedia(pagedata.appcode)}}"  />
                </div>
				
         </div>
	  <div ng-click="pagedata.show=0" style="text-align:center">关闭 </div>
    </div>
</div>
<script type="text/javascript">
scope.show = function(){
 window.scope.pagedata.show=1;
scope.$apply();
}
</script>
<script language="javascript">
wx.ready(function () {
	scope.scancode = function(){
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					location.href= result;					
				}
			});
	};
});
scope.pagedata.openLocation=function(item){
	wx.openLocation({
	latitude: item.lat_lng.lat, // 纬度，浮点数，范围为90 ~ -90
	longitude: item.lat_lng.lng, // 经度，浮点数，范围为180 ~ -180。
		name: item.province+item.city+item.district, // 位置名
		address: item.address, // 地址详情说明
		scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
		infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
		success:function(){
			//alert(1111);
		}
	});
}
</script>
	<script type="text/javascript">
	// 百度地图API功能
	require(['map'], function(BMap){
		var map = new BMap.Map("l-map");
		var lng=scope.pagedata.store.lat_lng.lng ? scope.pagedata.store.lat_lng.lng : '113.941134';
		var lat=scope.pagedata.store.lat_lng.lat ? scope.pagedata.store.lat_lng.lat : '22.546011';
		var point = new BMap.Point(lng, lat);
		map.centerAndZoom(point, 15);
		// 编写自定义函数,创建标注
		function addMarker(point){
		  var marker = new BMap.Marker(point);
		  map.addOverlay(marker);
		}
		addMarker(point);
	});
	</script>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
</script>
<div ng-include="sys_html('common/pluginnav',true)"></div>